home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / gs261src.zip / bcwin.mak < prev    next >
Text File  |  1993-05-27  |  8KB  |  277 lines

  1. #    Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2. #
  3. # This file is part of Ghostscript.
  4. #
  5. # Ghostscript is distributed in the hope that it will be useful, but
  6. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. # to anyone for the consequences of using it or for whether it serves any
  8. # particular purpose or works at all, unless he says so in writing.  Refer
  9. # to the Ghostscript General Public License for full details.
  10. #
  11. # Everyone is granted permission to copy, modify and redistribute
  12. # Ghostscript, but only under the conditions described in the Ghostscript
  13. # General Public License.  A copy of this license is supposed to have been
  14. # given to you along with Ghostscript so you can know your rights and
  15. # responsibilities.  It should be in a file named COPYING.  Among other
  16. # things, the copyright notice and this notice must be preserved on all
  17. # copies.
  18.  
  19. # makefile for Ghostscript, MS-Windows 3.n/Borland C++ 3.0 or 3.1 platform.
  20.  
  21. # ------------------------------- Options ------------------------------- #
  22.  
  23. ###### This section is the only part of the file you should need to edit.
  24.  
  25. # ------ Generic options ------ #
  26.  
  27. # Define the default directory/ies for the runtime
  28. # initialization and font files.  Separate multiple directories with \;.
  29. # Use / to indicate directories, not a single \.
  30.  
  31. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  32.  
  33. # Define the name of the Ghostscript initialization file.
  34. # (There is no reason to change this.)
  35.  
  36. GS_INIT=gs_init.ps
  37.  
  38. # Choose generic configuration options.
  39.  
  40. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  41. # Code runs substantially slower even if no debugging switches are set,
  42. # and also takes about another 25K of memory.
  43.  
  44. DEBUG=0
  45.  
  46. # Setting TDEBUG=1 includes symbol table information for the Borland debugger.
  47. # No execution time or space penalty, just larger .OBJ and .EXE files
  48. # and slower linking.
  49.  
  50. TDEBUG=0
  51.  
  52. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  53. # so they are visible to the debugger and profiler.
  54. # No execution time or space penalty, just larger .OBJ and .EXE files.
  55.  
  56. NOPRIVATE=0
  57.  
  58. # Define the name of the executable file.
  59.  
  60. GS=gswin
  61.  
  62. # ------ Platform-specific options ------ #
  63.  
  64. # If you don't have an assembler, set USE_ASM=0.  Otherwise, set USE_ASM=1,
  65. # and set ASM to the name of the assembler you are using.  This can be
  66. # a full path name if you want.  Normally it will be masm or tasm.
  67.  
  68. USE_ASM=1
  69. ASM=tasm
  70.  
  71. # Define the drive, directory, and compiler name for the Turbo C files.
  72. # COMP is the compiler name (tcc for Turbo C++, bcc for Borland C++).
  73. # COMPDIR contains the compiler and linker (normally \bc\bin).
  74. # INCDIR contains the include files (normally \bc\include).
  75. # LIBDIR contains the library files (normally \bc\lib).
  76. # Note that these prefixes are always followed by a \,
  77. #   so if you want to use the current directory, use an explicit '.'.
  78.  
  79. COMP=bcc
  80. COMPDIR=c:\bc\bin
  81. INCDIR=c:\bc\include
  82. LIBDIR=c:\bc\lib
  83.  
  84. # Define the Windows directory.
  85.  
  86. WINDIR=c:\windows
  87.  
  88. # Windows 3.n requires a 286 CPU or higher.
  89.  
  90. CPU_TYPE=286
  91.  
  92. # Don't rely on FPU for Windows: Options are -1 (optimize for no FPU) or
  93. # 0 (optimize for FPU present, but do not require a FPU).
  94.  
  95. FPU_TYPE=0
  96.  
  97. # ---------------------------- End of options ---------------------------- #
  98.  
  99. # Swapping `make' out of memory makes linking much faster.
  100.  
  101. .swap
  102.  
  103. # Define the platform name.
  104.  
  105. PLATFORM=bcwin_
  106.  
  107. # Define the name of the makefile -- used in dependencies.
  108.  
  109. MAKEFILE=bcwin.mak
  110.  
  111. # Define the ANSI-to-K&R dependency.  Turbo C accepts ANSI syntax,
  112. # but we need to preconstruct ccf.tr to get around the limit on
  113. # the maximum length of a command line.
  114.  
  115. AK=ccf.tr
  116.  
  117. # Define the compilation flags for an 80286.
  118. # This is void because we handle -2 and -3 in ccf.tr (see below).
  119.  
  120. F286=
  121.  
  122. # Figure out which version of Borland C++ we are running.
  123. # In the MAKE program that comes with Borland C++ 2.0, __MAKE__ is 0x300;
  124. # in the MAKE that comes with Borland C++ 3.0 and 3.1, it is 0x360.
  125. # We care because 3.0 has additional optimization features.
  126. # There are also some places below where we distinguish BC++ 3.1 from 3.0
  127. #   by testing whether $(INCDIR)\win30.h exists (true in 3.1, false in 3.0).
  128.  
  129. EXIST_BC3_1=exist $(INCDIR)\win30.h
  130.  
  131. # Figure out which version of Windows we are running, 3.0 or 3.1.
  132. # I *think* 3.0 doesn't have the 256COLOR.BMP file.
  133.  
  134. WINDOWS_3_1=exist $(WINDIR)\256color.bmp
  135.  
  136. !if $(__MAKE__) >= 0x360
  137. CO=-Obe -Z
  138. !else
  139. CO=-O
  140. !endif
  141.  
  142. !include "tccommon.mak"
  143.  
  144. # Define the compilation flags.
  145.  
  146. !if $(NOPRIVATE)
  147. CP=-DNOPRIVATE
  148. !else
  149. CP=
  150. !endif
  151.  
  152. !if $(DEBUG) | $(TDEBUG)
  153. CS=-N
  154. !else
  155. CS=
  156. !endif
  157.  
  158. !if $(DEBUG)
  159. CD=-DDEBUG
  160. !else
  161. CD=
  162. !endif
  163.  
  164. !if $(TDEBUG)
  165. CT=-v
  166. LCT=/v
  167. !else
  168. CT=-y
  169. LCT=/m /l
  170. !endif
  171.  
  172. GENOPT=$(CP) $(CS) $(CD) $(CT)
  173.  
  174. CCFLAGS0=$(GENOPT) $(PLATOPT) $(FPFLAGS)
  175. CCFLAGS=$(CCFLAGS0) -m$(MM)
  176. CC=$(COMPDIR)\$(COMP) -m$(MM) -zEGS_FAR_DATA @ccf.tr
  177. # We want a Windows executable with only selected functions exported:
  178. WX=-WE
  179. CCC=$(CC) $(WX) $(CO) -c
  180. CCD=$(CC) $(WX) -O -c
  181. CCCF=$(CCC)
  182. CCINT=$(CC) $(WX) -c
  183.  
  184. .c.obj:
  185.     $(CCC) { $<}
  186.  
  187. # ------ Devices and features ------ #
  188.  
  189. # Choose the language feature(s) to include.  See gs.mak for details.
  190. # Since Ghostscript runs in enhanced mode, we include a fair number
  191. # of drivers, but we can't exceed 64K of static data.
  192.  
  193. FEATURE_DEVS=filter.dev dps.dev level2.dev
  194.  
  195. # Choose the device(s) to include.  See devs.mak for details.
  196.  
  197. DEVICE_DEVS=mswin.dev mswinprn.dev
  198. DEVICE_DEVS3=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  199. DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev
  200. DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev
  201. DEVICE_DEVS7=bmpmono.dev bmp16.dev bmp256.dev bmp16m.dev
  202. DEVICE_DEVS8=gifmono.dev gif8.dev bit.dev
  203. !include "gs.mak"
  204. !include "devs.mak"
  205.  
  206. # Build the compiler response file depending on the selected options.
  207.  
  208. ccf.tr: $(MAKEFILE) makefile
  209.     echo -2 -a -d -r -G -N -X -I$(INCDIR) $(CCFLAGS0) -DCHECK_INTERRUPTS >ccf.tr
  210. !if $(CPU_TYPE) > 286
  211.     echo -3 -a -d -r -G -N -X -I$(INCDIR) $(CCFLAGS0) -DCHECK_INTERRUPTS >_temp_
  212.     if $(EXIST_BC3_1) copy _temp_ ccf.tr
  213. !endif
  214.  
  215. # -------------------------------- Library -------------------------------- #
  216.  
  217. # The Turbo/Borland C(++), Microsoft Windows platform
  218.  
  219. # Using a file device resource to get the console streams re-initialized
  220. # is bad architecture (an upward reference to zfiledev),
  221. # but it will have to do for the moment.
  222. bcwin__=gp_mswin.$(OBJ) gp_mswtx.$(OBJ) gp_msdos.$(OBJ) gp_nofb.$(OBJ)
  223. bcwin_.dev: $(bcwin__)
  224.     $(SHP)gssetmod bcwin_ $(bcwin__)
  225.     $(SHP)gsaddmod bcwin_ -fdev wstdio
  226.  
  227. gp_mswin.$(OBJ): gp_mswin.c $(AK) gp_mswin.h gp_mswtx.h \
  228.  $(ctype__h) $(dos__h) $(malloc__h) $(memory__h) $(stdio__h) $(string__h) $(windows__h) \
  229.  $(gx_h) $(gp_h) $(gpcheck_h) $(gserrors_h) $(gxdevice_h)
  230.  
  231. gp_mswtx.$(OBJ): gp_mswtx.c $(AK) gp_mswtx.h \
  232.  $(ctype__h) $(dos__h) $(memory__h) $(string__h) $(windows__h)
  233.  
  234. gp_msdos.$(OBJ): gp_msdos.c $(AK) $(dos__h) $(string__h) \
  235.  $(gstypes_h) $(gp_h) $(gsutil_h)
  236.  
  237. # ----------------------------- Main program ------------------------------ #
  238.  
  239. BEGINFILES=gs*.res gs*.ico
  240. CCBEGIN=$(CCC) *.c
  241.  
  242. # Get around the fact that the DOS shell has a rather small limit on
  243. # the length of a command line.  (sigh)
  244.  
  245. LIBCTR=libc$(MM).tr
  246.  
  247. $(LIBCTR): $(MAKEFILE) makefile
  248.     echo $(LIBDIR)\import $(LIBDIR)\mathw$(MM) $(LIBDIR)\cw$(MM) >$(LIBCTR)
  249.  
  250. LIBDOS=$(LIBGS) obj.tr
  251.  
  252. # Interpreter main program
  253.  
  254. ICONS=gsgraph.ico gstext.ico
  255.  
  256. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\
  257.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr $(GS).res $(GS).def $(ICONS)
  258.  
  259. # Make the icons from their text form.
  260.  
  261. gsgraph.ico: gsgraph.icx echogs$(XE)
  262.     echogs -wb gsgraph.ico -n -X -r gsgraph.icx
  263.  
  264. gstext.ico: gstext.icx echogs$(XE)
  265.     echogs -wb gstext.ico -n -X -r gstext.icx
  266.  
  267. $(GS).res: $(GS).rc gp_mswin.h $(ICONS)
  268.     $(COMPDIR)\rc -i$(INCDIR) -r $(GS)
  269.  
  270. $(GS)$(XE): $(GS_ALL) $(ALL_DEVS)
  271.     tlink $(LCT) /Twe $(LIBDIR)\c0w$(MM) @obj.tr $(INTASM) @gs.tr ,$(GS),$(GS),@lib.tr @$(LIBCTR),$(GS).def
  272.     echo $(COMPDIR)\rc -30 -i$(INCDIR) $(GS) >_temp_.bat
  273.     echo $(COMPDIR)\rc -i$(INCDIR) $(GS) >_temp_
  274.     if not $(EXIST_BC3_1) copy _temp_ _temp_.bat
  275.     if $(WINDOWS_3_1) copy _temp_ _temp_.bat
  276.     _temp_.bat
  277.